import sqlite3

from sqlite3 import Error


def sql_connection():
    try:
        con = sqlite3.connect('news.db')
        return con
    except Error:
        print(Error)


def sql_table(con):
    cursorObj = con.cursor()

    cursorObj.execute(
        "CREATE TABLE news_info(url text PRIMARY KEY, title text, content text, username text, keywords text)")

    con.commit()


con = sql_connection()

sql_table(con)


